DESCEND
Section: User Commands (1)
Updated: 31 March 1992
Index
Return to Main Contents
NAME
descend - walk directory tree and execute a command at each node
SYNOPSIS
descend
[
-afqrv
]
command
[
directory
...
]
DESCRIPTION
descend
walks down a directory tree and executes a command at each node. It
is not as versatile as
find(1),
but it has a simpler syntax. If no
directory
is specified,
descend
starts at the current one.
Unlike
find,
descend
can be told to skip the special directories associated with RCS,
CVS, and SCCS. This makes
descend
especially handy for use with these packages. It can be used with
other commands too, of course.
descend
is a poor man's way to make any command recursive. Note:
descend
does not follow symbolic links to directories unless they are
specified on the command line.
OPTIONS
- -a
-
All.
Descend into directories that begin with '.'.
- -f
-
Force.
Ignore errors during descent. Normally,
descend
quits when an error occurs.
- -q
-
Quiet.
Suppress the message `In directory
directory'
that is normally printed during the descent.
- -r
-
Restricted.
Don't descend into the special directories
RCS,
CVS,
CVS.adm,
and
SCCS.
- -v
-
Verbose.
Print
command
before executing it.
EXAMPLES
- descend ls
-
Cheap substitute for `ls -R'.
- descend -f 'rm *' tree
-
Strip `tree' of its leaves. This command descends the `tree'
directory, removing all regular files. Since
rm(1)
does not remove directories, this command leaves the directory
structure of `tree' intact, but denuded. The
-f
option is required to keep
descend
from quitting. You could use `rm -f' instead.
- descend -r 'co RCS/*' /project/src/
-
Check out every RCS file under the directory
/project/src.
- descend -r 'cvs diff'
-
Perform CVS `diff' operation on every directory below (and including)
the current one.
DIAGNOSTICS
Returns 1 if errors occur (and the
-f
option is not used). Otherwise returns 0.
SEE ALSO
find(1),
rcsintro(1),
cvs(1),
sccs(1)
AUTHOR
Lowell Skoog
Software Technology Group
John Fluke Mfg. Co., Inc.
BUGS
Shell metacharacters in
command
may have bizarre effects. In particular, compound commands
(containing ';', '[', and ']' characters) will not work. It is best
to enclose complicated commands in single quotes ´ ´.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- DIAGNOSTICS
-
- SEE ALSO
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 23:19:13 GMT, August 09, 2024